Automatic lens flare detection and correction for light-field images

ABSTRACT

According to various embodiments, the system and method disclosed herein process light-field image data so as to mitigate lens flare effects. A light-field image may be captured with a light-field image capture device with a microlens array and received in a data store. A plurality of flare-affected pixels may be identified in the light-field image. The flare-affected pixels may have flare-affected pixel values. Flare-corrected pixel values may be generated for the flare-affected pixels. Relative to the flare-affected pixel values, the flare-corrected pixel values may at least partially remove the lens flare effects. The flare-corrected pixel values may be used to generate a corrected light-field image in which the lens flare effects are at least partially corrected. The corrected light-field image may be displayed on a display screen.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is related to U.S. application Ser. No. 13/774,925 for “Compensating for Sensor Saturation and Microlens Modulation During Light-Field Image Processing” (Atty. Docket No. LYT019), filed Feb. 22, 2013, issued on Feb. 3, 2015 as U.S. Pat. No. 8,948,545, the disclosure of which is incorporated herein by reference in its entirety.

The present application is related to U.S. Utility application Ser. No. 13/774,971 for “Compensating for Variation in Microlens Position During Light-Field Image Processing” (Atty. Docket No. LYT021), filed on Feb. 22, 2013, issued on Sep. 9, 2014 as U.S. Pat. No. 8,831,377, the disclosure of which is incorporated herein by reference in its entirety.

The present application is related to U.S. Utility application Ser. No. 13/774,986 for “Light-Field Processing and Analysis, Camera Control, and User Interfaces and Interaction on Light-Field Capture Devices” (Atty. Docket No. LYT066), filed on Feb. 22, 2013, issued on Mar. 31, 2015 as U.S. Pat. No. 8,995,785, the disclosure of which is incorporated herein by reference in its entirety.

The present application is related to U.S. Utility application Ser. No. 13/688,026 for “Extended Depth of Field and Variable Center of Perspective in Light-Field Processing” (Atty. Docket No. LYT003), filed on Nov. 28, 2012, issued on Aug. 19, 2014 as U.S. Pat. No. 8,811,769, the disclosure of which is incorporated herein by reference in its entirety.

The present application is related to U.S. Utility application Ser. No. 11/948,901 for “Interactive Refocusing of Electronic Images,” (Atty. Docket No. LYT3000), filed Nov. 30, 2007, issued on Oct. 15, 2013 as U.S. Pat. No. 8,559,705, the disclosure of which is incorporated herein by reference in its entirety.

The present application is related to U.S. Utility application Ser. No. 12/703,367 for “Light-field Camera Image, File and Configuration Data, and Method of Using, Storing and Communicating Same,” (Atty. Docket No. LYT3003), filed Feb. 10, 2010, now abandoned, the disclosure of which is incorporated herein by reference in its entirety.

The present application is related to U.S. Utility application Ser. No. 13/027,946 for “3D Light-field Cameras, Images and Files, and Methods of Using, Operating, Processing and Viewing Same” (Atty. Docket No. LYT3006), filed on Feb. 15, 2011, issued on Jun. 10, 2014 as U.S. Pat. No. 8,749,620, the disclosure of which is incorporated herein by reference in its entirety.

The present application is related to U.S. Utility application Ser. No. 13/155,882 for “Storage and Transmission of Pictures Including Multiple Frames,” (Atty. Docket No. LYT009), filed Jun. 8, 2011, issued on Dec. 9, 2014 as U.S. Pat. No. 8,908,058, the disclosure of which is incorporated herein by reference in its entirety.

TECHNICAL FIELD

The present disclosure relates to systems and methods for processing and displaying light-field image data, and more specifically, to systems and methods for removing and/or mitigating lens flare effects in light-field images.

BACKGROUND

Light-field images represent an advancement over traditional two-dimensional digital images because light-field images typically encode additional data for each pixel related to the trajectory of light rays incident to that pixel when the light field image was taken. This data can be used to manipulate the light-field image through the use of a wide variety of rendering techniques that are not possible to perform with a conventional photograph. In some implementations, a light-field image may be refocused and/or altered to simulate a change in the center of perspective (CoP) of the camera that received the image. Further, a light field image may be used to generate an enhanced depth-of-field (EDOF) image in which all parts of the image are in focus.

Unfortunately, light-field images are susceptible to some of the same image distortions found in conventional images, such as lens flare. “Lens flare” is the light scattered in a lens system through generally unwanted image formation mechanisms, such as internal reflection and scattering from material inside the lens system. In a conventional camera, lens flare usually leads to loss of contrast in the image. In light-field imaging, lens flare can produce artifacts in the light-field image that are particularly distracting because they show the microlens structure of the light-field image. Such artifacts may resemble many small bright spots rather than what viewers normally associate with lens flare. Portions of the image that should be solid in color may have bright flecks. Thus, it would be an advancement in the art to provide processing systems and methods capable of preventing, removing, and/or mitigating lens flare effects in light-field images.

SUMMARY

According to various embodiments, the system and method described herein process light-field image data so as to prevent, remove, and/or mitigate lens flare effects. These techniques may be used in the processing of light-field images such as a light-field image received from a light-field image capture device having a sensor and a plurality of microlenses.

The light-field image may be received in a data store. A processor may identify a plurality of flare-affected pixels affected by the lens flare. The flare-affected pixels may have flare-affected pixel values. The flare-affected pixels may be identified in various ways.

In some embodiments, the flare-affected pixels may be identified by, first, dividing the light-field image into a plurality of tiles, which may correspond to the microlenses of the light-field image capture device. Within each of the tiles, one or more maximum value pixels may be identified. Each of the maximum value pixels may have a pixel value higher than those of neighboring pixels. Thus, the maximum value pixels may be identified by comparing their pixel values with those of neighboring pixels. For each of the maximum value pixels, a flare model may be generated to indicate the location of the maximum value pixel within the tile.

The model may then be used for each maximum value pixel to compute the probability that the maximum value pixel is a flare-affected pixel. This may be done, for example, by comparing the location of the maximum value pixel with those of neighboring maximum value pixels. In this manner, it may be determined that at least some of the maximum value pixels are likely to be flare-affected pixels. The comparison with neighboring maximum value pixels may involve the use of a bilinear interpolation.

In other embodiments, the maximum value pixels may be identified as indicated above. Then, the flare-affected pixels may be identified by generating a global parametric flare model of the effects of the lens flare based on the locations of the maximum value pixels. The global parametric flare model may be a simple affine model that predicts the u and v coordinates of each maximum value pixel based on its location in the x and y directions. The affine model may be fitted to the light-field image by ascertaining the applicable constants that enable the affine model to most closely fit the locations of the maximum value pixels.

Once the flare-affected pixels have been identified, flare-corrected pixels may be generated for the flare-affected pixels. Relative to the flare-affected pixel values, the flare-corrected pixel values may at least partially remove (or in other words, mitigate) the effects of the lens flare. This may also be accomplished in various ways.

In some embodiments, the flare-corrected pixel values may be generated by, for each of the identified flare-affected pixels, using neighboring pixels to interpolate the flare-corrected pixel value. If the flare-affected pixel is located on an edge depicted in the light-field image, interpolation may be carried out by identifying edge-located neighboring pixels that are also located on the edge. Interpolation may be carried out exclusively using the edge-located neighboring pixels to preserve the integrity of the edge.

In other embodiments, the flare-corrected pixel values may be generated via application of a probability that each maximum value pixel is actually a flare-affected pixel. This probability may be computed as set forth above. The probability may be used to assign a weight, inversely proportional to the probability, to each of the maximum value pixels. Then, the flare-corrected pixel values may be generated by processing the light-field image with at least one process in which each of the flare-affected pixels is excluded from processing in proportion to the weight assigned to it.

Once the flare-corrected pixel values have been obtained, they may be used to generate a corrected light-field image in which the lens flare has been at least partially removed. In some embodiments, this may be done by, again, using the probability, for each of the maximum value pixels, that the maximum value pixel has been affected by lens flare. For each of the flare-affected pixels, the flare-affected pixel value may be blended with the flare-corrected pixel value, with the flare-corrected pixel value weighted in proportion to the probability. Thus, the pixel values pixels that have a higher probability of being flare-affected pixels may undergo a larger amount of correction. The corrected light-field image may be displayed, for example, on a display screen.

In some embodiments, the steps of identifying the maximum value pixels, generating the flare-corrected values, and/or generating a flare-corrected light-field image may be carried out recursively. Thus, the quality of correction of a lens flare may be enhanced and/or multiple lens flares may be corrected.

Further, in some embodiments, the user may designate one or more parameters applicable to identifying the maximum value pixels, generating the flare-corrected values, and/or generating a flare-corrected light-field image. The user may, for example, designate a subset of the light-field image to be corrected for lens flare as set forth above, or determine a degree of correction to be applied to the corrected light-field image.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings illustrate several embodiments. Together with the description, they serve to explain the principles of the embodiments. One skilled in the art will recognize that the particular embodiments illustrated in the drawings are merely exemplary, and are not intended to limit scope.

FIG. 1 depicts a portion of a light-field image.

FIG. 2 depicts an example of an architecture for implementing the methods of the present disclosure in a light-field capture device, according to one embodiment.

FIG. 3 depicts an example of an architecture for implementing the methods of the present disclosure in a post-processing system communicatively coupled to a light-field capture device, according to one embodiment.

FIG. 4 depicts an example of an architecture for a light-field camera for implementing the methods of the present disclosure according to one embodiment.

FIG. 5A is an exemplary light-field image affected by lens flare.

FIG. 5B is a zoomed in portion of a lens flare-affected portion of the light-field image of FIG. 5A.

FIG. 6 is a flow diagram depicting a method of carrying out lens flare correction, according to one embodiment.

FIG. 7 is the light-field image of FIG. 5A, divided into tiles to facilitate identification of flare-affected pixels.

FIG. 8 is the zoomed in portion of FIG. 5B, illustrating the use of bilinear interpolation to calculate the coordinate of a flare pixel.

FIG. 9 is a graph illustrating a linear function illustrating calculation of the probability that a maximum value pixel is a flare affected pixel based on the discrepancy between modeled flare coordinates and the actual coordinates of the maximum value pixel.

FIG. 10A is a light-field image before processing to correct lens flare.

FIG. 10B is a map of the maximum value pixels of the light-field image of FIG. 10A, as identified by a first identification method.

FIG. 10C is a map of the probability that each of the pixels of FIG. 10A is a flare-affected pixel, as obtained through the first identification method.

FIG. 10D is a corrected light-field image obtained by processing the light-field image of FIG. 10A to correct for lens flare, according to a first correction method.

FIG. 10E is a map of the maximum value pixels of the light-field image of FIG. 10A, as identified by a second identification method.

FIG. 10F is a map of the pixel weights of the light-field image of FIG. 10A, according to a second correction method.

FIG. 11A is a light-field image before processing to correct for lens flare.

FIG. 11B is a corrected light-field image generated by application of the first identification method and the first correction method to the light-field image of FIG. 11A.

FIG. 11C is a corrected light-field image generated by application of the second identification method and the second correction method to the light-field image of FIG. 11A.

DEFINITIONS

For purposes of the description provided herein, the following definitions are used:

-   -   Corrected light-field image: the resulting image after a         light-field image has been processed to correct an image         distortion such as lens flare.     -   Depth: a representation of displacement between an object and/or         corresponding image sample and a microlens array of a camera.     -   Disk: a region in a light-field image that is illuminated by         light passing through a single microlens; may be circular or any         other suitable shape.     -   Extended depth of field (EDOF) image: an image that has been         processed to have objects in focus along a greater depth range.     -   Flare-affected pixels: pixels of an image with values that are         believed to have been affected by lens flare.     -   flare-affected pixel values: the pixel values of flare-affected         pixels     -   Flare-corrected pixel values: the pixel values of flare-affected         pixels after correction has been applied.     -   Flare model: a formula, equation, or other analytical framework         that can be used to describe effects of a lens flare on an         image.     -   Image: a two-dimensional array of pixel values, or pixels, each         specifying a color.     -   Image processing algorithm: any computer-implemented procedure         for modifying an image.     -   Intermediate light-field image: a processed light-field image         that is to undergo further processing.     -   Lens flare: light scattered within a lens system through         generally unwanted image formation mechanisms.     -   Light-field image: an image that contains a representation of         light field data captured at the sensor.     -   Maximum value pixels: pixels of an image that have a high pixel         value relative to surrounding pixels.     -   Microlens: a small lens, typically one in an array of similar         microlenses.     -   Pixel value: a number indicative of hue, luminance, intensity,         and/or saturation of a pixel.     -   Processed light-field image: the resulting image after one or         more processing steps are applied to a light-field image.     -   Sample: one or more pixels of an image.     -   Tiles: subsets of an image that are arranged in a         two-dimensional pattern.

In addition, for ease of nomenclature, the term “camera” is used herein to refer to an image capture device or other data acquisition device. Such a data acquisition device can be any device or system for acquiring, recording, measuring, estimating, determining and/or computing data representative of a scene, including but not limited to two-dimensional image data, three-dimensional image data, and/or light-field data. Such a data acquisition device may include optics, sensors, and image processing electronics for acquiring data representative of a scene, using techniques that are well known in the art. One skilled in the art will recognize that many types of data acquisition devices can be used in connection with the present disclosure, and that the disclosure is not limited to cameras. Thus, the use of the term “camera” herein is intended to be illustrative and exemplary, but should not be considered to limit the scope of the disclosure. Specifically, any use of such term herein should be considered to refer to any suitable device for acquiring image data.

In the following description, several techniques and methods for processing light-field images are described. One skilled in the art will recognize that these various techniques and methods can be performed singly and/or in any suitable combination with one another.

Architecture

In at least one embodiment, the system and method described herein can be implemented in connection with light-field images captured by light-field capture devices including but not limited to those described in Ng et al., Light-field photography with a hand-held plenoptic capture device, Technical Report CSTR 2005 February, Stanford Computer Science. Referring now to FIG. 2, there is shown a block diagram depicting an architecture for implementing the method of the present disclosure in a light-field capture device such as a camera 800. Referring now also to FIG. 3, there is shown a block diagram depicting an architecture for implementing the method of the present disclosure in a post-processing system communicatively coupled to a light-field capture device such as a camera 800, according to one embodiment. One skilled in the art will recognize that the particular configurations shown in FIGS. 2 and 3 are merely exemplary, and that other architectures are possible for camera 800. One skilled in the art will further recognize that several of the components shown in the configurations of FIGS. 2 and 3 are optional, and may be omitted or reconfigured.

In at least one embodiment, camera 800 may be a light-field camera that includes light-field image data acquisition device 809 having optics 801, image sensor 803 (including a plurality of individual sensors for capturing pixels), and microlens array 802. Optics 801 may include, for example, aperture 812 for allowing a selectable amount of light into camera 800, and main lens 813 for focusing light toward microlens array 802. In at least one embodiment, microlens array 802 may be disposed and/or incorporated in the optical path of camera 800 (between main lens 813 and sensor 803) so as to facilitate acquisition, capture, sampling of, recording, and/or obtaining light-field image data via sensor 803. Referring now also to FIG. 4, there is shown an example of an architecture for a light-field camera 800 for implementing the method of the present disclosure according to one embodiment. The Figure is not shown to scale. FIG. 4 shows, in conceptual form, the relationship between aperture 812, main lens 813, microlens array 802, and sensor 803, as such components interact to capture light-field data for subject 901. In at least one embodiment, light-field camera 800 may also include a user interface 805 for allowing a user to provide input for controlling the operation of camera 800 for capturing, acquiring, storing, and/or processing image data.

In at least one embodiment, light-field camera 800 may also include control circuitry 810 for facilitating acquisition, sampling, recording, and/or obtaining light-field image data. For example, control circuitry 810 may manage and/or control (automatically or in response to user input) the acquisition timing, rate of acquisition, sampling, capturing, recording, and/or obtaining of light-field image data.

In at least one embodiment, camera 800 may include memory 811 for storing image data, such as output by image sensor 803. Such memory 811 can include external and/or internal memory. In at least one embodiment, memory 811 can be provided at a separate device and/or location from camera 800.

For example, camera 800 may store raw light-field image data, as output by sensor 803, and/or a representation thereof, such as a compressed image data file. In addition, as described in related U.S. Utility application Ser. No. 12/703,367 for “Light-field Camera Image, File and Configuration Data, and Method of Using, Storing and Communicating Same,” (Atty. Docket No. LYT3003), filed Feb. 10, 2010, memory 811 can also store data representing the characteristics, parameters, and/or configurations (collectively “configuration data”) of device 809.

In at least one embodiment, captured image data is provided to post-processing circuitry 804. Such circuitry 804 may be disposed in or integrated into light-field image data acquisition device 809, as shown in FIG. 2, or it may be in a separate component external to light-field image data acquisition device 809, as shown in FIG. 3. Such separate component may be local or remote with respect to light-field image data acquisition device 809. Any suitable wired or wireless protocol can be used for transmitting image data 821 to circuitry 804; for example camera 800 can transmit image data 821 and/or other data via the Internet, a cellular data network, a WiFi network, a Bluetooth communication protocol, and/or any other suitable means.

Such a separate component may include any of a wide variety of computing devices, including but not limited to computers, smartphones, tablets, cameras, and/or any other device that processes digital information. Such a separate component may include additional features such as a user input 815 and/or a display screen 816. If desired, light-field image data may be displayed for the user on the display screen 816.

Overview

Light-field images often include a plurality of projections (which may be circular or of other shapes) of aperture 812 of camera 800, each projection taken from a different vantage point on the camera's focal plane. The light-field image may be captured on sensor 803. The interposition of microlens array 802 between main lens 813 and sensor 803 causes images of aperture 812 to be formed on sensor 803, each microlens in array 802 projecting a small image of main-lens aperture 812 onto sensor 803. These aperture-shaped projections are referred to herein as disks, although they need not be circular in shape. The term “disk” is not intended to be limited to a circular region, but can refer to a region of any shape.

Light-field images include four dimensions of information describing light rays impinging on the focal plane of camera 800 (or other capture device). Two spatial dimensions (herein referred to as x and y) are represented by the disks themselves. For example, the spatial resolution of a light-field image with 120,000 disks, arranged in a Cartesian pattern 400 wide and 300 high, is 400×300. Two angular dimensions (herein referred to as u and v) are represented as the pixels within an individual disk. For example, the angular resolution of a light-field image with 100 pixels within each disk, arranged as a 10×10 Cartesian pattern, is 10×10. This light-field image has a 4D (x,y,u,v) resolution of (400,300,10,10). Referring now to FIG. 1, there is shown an example of a 2-disk by 2-disk portion of such a light-field image, including depictions of disks 102 and individual pixels 203; for illustrative purposes, each disk 102 is ten pixels 203 across.

In at least one embodiment, the 4D light-field representation may be reduced to a 2-D image through a process of projection and reconstruction. As described in more detail in related U.S. Utility application Ser. No. 13/774,971 for “Compensating for Variation in Microlens Position During Light-Field Image Processing,” (Atty. Docket No. LYT021), filed Feb. 22, 2013, the disclosure of which is incorporated herein by reference in its entirety, a virtual surface of projection may be introduced, and the intersections of representative rays with the virtual surface can be computed. The color of each representative ray may be taken to be equal to the color of its corresponding pixel.

Any number of image processing techniques can be used to reduce color artifacts, reduce projection artifacts, increase dynamic range, and/or otherwise improve image quality. Examples of such techniques, including for example modulation, demodulation, and demosaicing, are described in related U.S. application Ser. No. 13/774,925 for “Compensating for Sensor Saturation and Microlens Modulation During Light-Field Image Processing” (Atty. Docket No. LYT019), filed Feb. 22, 2013, the disclosure of which is incorporated herein by reference.

In particular, processing can be performed on enhanced depth-of-field (EDOF) image in which all parts of the image are in focus. However, such processing steps may be of limited use in conventional operation on EDOF images, because the depth map accuracy as well as the light field data itself can have strong depth-dependent variation in terms of sampling, prefiltering, and noise level. Processing the entire EDOF output as a single 2D image can result in unwanted artifacts, especially when highly spatially-unstable processing techniques are used in enhancing the image. Accordingly, in at least one embodiment, a layered image processing technique is used.

Lens Flare Correction

As mentioned above, various image processing steps may be used to prevent, remove, and/or mitigate lens flare effects in light-field images. The result may be the provision of a corrected light-field image in which the effects of the lens flare are much less visible. Lens flare correction may be performed automatically and/or with input from the user.

It has been observed that a lens flare often reaches the sensor (for example, the sensor 803 of FIG. 3) from a specific angular direction. Therefore, the flare signal may have a very smooth variation in the angular coordinates across the light-field image. Also, pixels with lens flare may have brighter intensities than neighboring pixels. This can be a useful feature for automatic lens flare detection. The structure of a light-field image, combined with the angular consistency of a lens flare, may facilitate lens flare correction in light-field images, as will be shown and described herein.

FIG. 5A is an exemplary light-field image 1000 affected by lens flare. The light-field image 1000 is in raw, lenslet-based form; accordingly, it has many disks 102 as in FIG. 1. Each of the disks 102 may contain several pixels 203. In FIG. 1, the portion at the lower right-hand side of the light-field image 1000 may most clearly illustrate the effects of lens flare, as each of the disks 102 has one or more pixels that are far brighter than their neighbors.

FIG. 5B is a zoomed in portion of a lens flare-affected portion 1050 of the light-field image 1000 of FIG. 5A. The lens flare-affected portion 1050 may be from the lower right-hand side of the light-field image 1000. The lens flare-affected portion 1050 more clearly illustrates the presence of brighter pixels 1060 within each of the disks 230. The brighter pixels 1060 may be unexpected for viewers who are not accustomed to light-field photography because in traditional photography, lens flare traditionally appears as a continuous halo effect on the image. Hence, the brighter pixels 1060 may undesirably reveal the manner in which the microlens array 802 divides the image based on the spacing of the microlenses in the microlens array 802. Lens flare correction according to the present disclosure may mitigate and/or eliminate the brighter pixels 1060.

FIG. 6 is a flow diagram depicting a method of carrying out lens flare correction, according to one embodiment. The method may be performed, for example, with circuitry such as the post-processing circuitry 804 of the camera 800 of FIG. 2 or the post-processing circuitry 804 of FIG. 3, which is independent of the camera 800. In some embodiments, a computing device may carry out the method; such a computing device may include one or more of desktop computers, laptop computers, smartphones, tablets, cameras, and/or other devices that process digital information.

The method may start 1100 with a step 1110 in which a light-field image (such as the light-field image 1000 of FIG. 5A) is captured, for example, by the sensor 803 of the camera 800. Light may pass from the subject 901 through the aperture 812, through the main lens 813 and through the microlens array 802 to be recorded by the sensor 803 as the light-field image 1000. During this process, lens flare effects may occur, and may be captured in the light-field image 1000.

In a step 1120, the light-field image data that defines the light-field image 1000 may be received in a data store, such as the memory 811. The light-field image 1000 may be received in the memory 811 of a computing device, which may be the camera 800 as in FIG. 2. Alternatively, the computing device with memory 811 that receives the light-field image 1000 may be separate from the camera 800 as in FIG. 3, and may be any type of computing device, including but not limited to desktop computers, laptop computers, smartphones, tablets, and the like.

In a step 1130, flare-affected pixels of the light-field image 1000 may be identified. This may entail, for example, identifying certain brighter pixels 1060 of the light-field image 1000, as illustrated in FIGS. 5A and 5B. This may be done in a wide variety of ways within the scope of the present disclosure. Two different identification methods will be discussed in detail herein; these can be used independently or in combination with one another.

The first identification method may involve analysis of small, local areas of the light-field image 1000. The first identification method may utilize the observation described above, that the angular coordinates of the flare-affected pixels will tend to remain relatively constant. Thus, linear modeling may be used to relatively rapidly identify flare-affected pixels, without the need for high-order modeling.

The second identification method may involve the generation of a flare model, which may be an affine model for the four-dimensional (4D) coordinates of the flare-affected pixels. The flare model may be used to refine the set of identified flare-affected pixels by eliminating outliers and/or including flare-affected pixels that were not identified initially.

The first and second identification methods will be discussed in detail subsequently, with reference to FIGS. 7 through 9. Upon completion of the step 1130, a list of the locations (i.e., the coordinates, for example, in the x,y,u,v schema described previously) of the flare-affected pixels may be obtained. In some embodiments, this list may take the form of a probability map indicating the probability that each pixel in the probability map is a flare-affected pixel. The probability map may have various gradations indicating various probability levels for each pixel. Thus, “identifying a flare-affected pixel” does not require making a binary determination that a pixel is or is not flare-affected, but may rather entail determination of a probability that the pixel is flare-affected.

Each of the flare-affected pixels may have a flare-affected pixel value that has been affected by the lens flare. For example, the flare-affected pixel value may be luminance, which may be artificially elevated due to the lens flare, thus causing the flare-affected pixels to appear brighter than surrounding pixels as in FIGS. 5A and 5B.

In a step 1140, flare-corrected pixel values may be generated for the flare-affected pixels. The flare-corrected pixel values may be pixel values that at least partially correct for the effects of the lens flare on the flare-affected pixel values. This may be done in a wide variety of ways within the scope of the present disclosure. Two different correction methods will be discussed in detail herein. Either may be used in combination with either of the identification methods.

The first correction method may involve local linear interpolation, which may be used to provide flare-corrected pixel values based on neighboring pixel values of neighboring pixels proximate each flare-affected pixel. The linear interpolation may be edge-sensitive, so as to preserve the integrity of edges depicted in the light-field image 1000.

The second correction method may utilize the probability descried above, regarding whether pixels of the light-field image 1000 are flare-affected pixels. Pixels with a high probability of being flare-affected pixels may be assigned lower weights in subsequent processing steps. Thus, the flare-corrected pixel values for these flare-affected pixels may be generated in the course of such further processing.

The first and second correction methods will also be discussed in detail subsequently, with reference to FIGS. 7 through 9. Upon completion of the step 1140, a flare-corrected value may be obtained for each of the flare-affected pixels. As indicated previously, identification of a pixel as a flare-affected pixel may entail assigning a probability level to the pixel indicating that the pixel is likely a flare-affected pixel. In some embodiments, the flare-corrected pixel value may differ from the flare-affected value in proportion to the probability level. For example, pixels with a high probability of being flare-affected pixels may have flare-corrected pixel values that differ more dramatically from the flare-affected pixel values.

In a step 1150, the flare-corrected pixel values may be used to generate a corrected light-field image. The corrected light-field image may be the light-field image 1000 with effects of the lens flare at least partially removed. The step 1150 may be carried out in various ways.

According to some embodiments, and in particular, where the probability that each pixel is a flare-affected pixel has not been used in the computation of the flare-corrected values, the flare-affected values and the flare-corrected values may be blended in proportion to the probability to generate the corrected light-field image. For example, for pixels with a high probability of being flare-affected pixels, the final pixel value may be close to the flare corrected pixel values. Conversely, for pixels with a low probability of being flare-affected pixels, the final pixel value may be close to the flare-affected pixel value.

In alternative embodiments, the flare-corrected pixel values may simply be used in place of the flare-affected pixel values for the flare-affected pixels to generate the corrected light-field image. Generation of the corrected light-field image may be done in this manner where the probability was used to generate the flare-corrected pixel values, as in the second correction method.

In a query 1160, a determination may be made as to whether all of the lens flare effects have been corrected to the desired degree. The query may be carried out in various ways. In some examples, the query 1160 may be carried out automatically by performing the step 1130 again, or by performing a similar step in which flare-affected pixels are automatically identified. If the number and/or probability of flare-affected pixels exceeds a predetermined threshold, then the query 1160 may be answered in the negative.

Additionally or alternatively, the query 1160 may function through the use of user input. For example, the corrected light-field image may be shown to the user, and the user may indicate that the lens flare in the corrected light-field image has or has not been sufficiently corrected.

If the query 1160 is answered in the negative, the method may return to the step 1130. Alternatively, if the step 1130 was performed as part of determining that the query 1160 was answered in the negative, the method may instead return to the step 1140, and may proceed to generate flare-corrected pixel values for the flare-affected pixels identified in the process of answering the query 1160. In either case, the corrected light-field image may be taken as an intermediate light-field image that will undergo further processing for lens flare correction. In the step 1150, a new corrected light-field image may be generated, and the query 1160 may once again be performed to determine whether the lens flare effects have been sufficiently corrected and/or removed. Once the query 1160 is answered in the affirmative, the method may end 1190.

The method of FIG. 6 is only one of many possible methods that may be used to prevent, remove, and/or mitigate lens flare effects in a light-field image. According to various alternatives, various steps of FIG. 6 may be carried out in a different order, omitted, and/or replaced by other steps. Further, various other image enhancement processes may be performed before, after between, and/or in conjunction with the steps of FIG. 6.

The method may help reduce and/or eliminate lens flare effects from the final image viewed by the user. Thus, the method may provide for a scene that appears, to the user, to be a more accurate representation of the subject matter captured in the light-field image. The various steps of FIG. 6 will be further described in connection with FIGS. 7A-10F, as follows.

First Identification Method

As indicated previously, the first identification method may involve analysis of small, local areas of the light-field image 1000. Thus, the first identification method may utilize an algorithm in which the light-field image is first separated into small, non-overlapping tiles. The tiles may be arranged in a two-dimensional rectangular grid pattern. The tiles may be square, rectangular, or any other shape; they may be the same size as one another or different sizes.

FIG. 7 depicts the light-field image 1000 of FIG. 5A, divided into tiles 1200 to facilitate identification of flare-affected pixels. The tiles 1200 may be non-overlapping, and may be arranged in a rectangular grid pattern as indicated above. If desired, each of the tiles 1200 may be sized so that each of the tiles 1200 contains the pixels corresponding to approximately one of the microlenses of the microlens array 802 (as shown in FIG. 4). Additionally or alternatively, each of the tiles 1200 may be sized to capture the pixels of more than one, or less than one, of the microlenses. By way of example, the tiles 1200 of FIG. 7 are arranged in a 26×21 grid array.

For each of the tiles 1200, the flare-affected pixels may be identified by comparing their pixel values to those of neighboring pixels. An algorithm used to accomplish this may first detect the maximum value pixels. A maximum value pixel may have a pixel value that is a local maximum, i.e., higher than pixel values of neighboring pixels. The pixel at i may be a maximum value pixel if the following conditions hold:

∀j∈Ω _(i) ,i≠j,P _(i) −P _(j) >T _(d) ,P _(i) >T _(p)  (1)

where P_(i) is the pixel value of i, Ω_(i) is a local window centered around pixel i, and T_(d) and T_(p) are constant thresholds. Since a lens flare may corrupt more than one pixel, the pixels around a maximum value pixel are also possible flare-affected pixels. The locations of all possible flare-affected pixels may be recorded in the form of list, map, or the like.

For each of the potential flare-affected pixels, the algorithm may further analyze the pixel coordinates in the four-dimensional light-field image 1000 to build a flare model. Here, (x,y) may be used to represent the spatial coordinate, and (u,v) may be used to represent the angular coordinate. In each of the tiles 1200, the flare may be modeled using the mean values of the angular coordinates of the potential flare-affected pixels in the tile 1200. This modeling may utilize an assumption that the angular variation of the flare is relatively constant in a small local area. Thus, the flare-affected pixels in a confined portion of the light-field image 1000 may be expected to have (u,v) coordinates that are similar to each other.

The result may be generation of a grid of flare models, one for each of the tiles 1200, which may be used in conjunction with the list of potential flare-affected pixels. In order to further improve the smoothness of the model, all neighboring models may be used to determine the probability that a potential flare-affected pixel in a given tile is actually a flare-affected pixel.

FIG. 8 is the zoomed in lens flare-affected portion 1050 of FIG. 5B, illustrating the use of bilinear interpolation to calculate the coordinates of a potential flare-affected pixel. Specifically, for each potential flare-affected pixel, a bilinear interpolation of the four neighboring models may be used to yield an estimate of the flare coordinates (u_(i),v_(i)) or the coordinates where one or more flare-affected pixels are expected to be found. In FIG. 8, (u_(i),v_(i)) is the estimate and {(U_(ab),V_(ab))−a={0,1}, b={0,1}} are the models of the four nearest tiles 1200 to the pixel.

Then, the discrepancy between the flare coordinates calculated by interpolation and the actual coordinates of the potential flare-affected pixel may be used to obtain the probability that the potential flare-affected pixel is actually a flare-affected pixel:

p _(i) =f(√{square root over ((u−u _(i))²+(v−v _(i))²)}).  (2)

where (u,v) are the actual light-field coordinates of the potential flare-affected pixel i, and (u_(i),v_(i)) are estimated light-field coordinates from interpolation of the flare models, p_(i) is the probability that pixel i is a flare-affected pixel, and f is a decreasing function. Many different functions may be use for f; in some examples f may be a mono-decreasing function (e.g. linear function or Gaussian function).

FIG. 9 is a graph 1400 illustrating a linear function illustrating calculation of the probability that a maximum value pixel is a flare affected pixel based on the discrepancy between modeled flare coordinates and the actual coordinates of the maximum value pixel. FIG. 9 provides an example of a linear mono-decreasing function, which may be used for f in (2) above. Thus, the probability may decrease linearly with increasing discrepancy between the actual and modeled coordinates of a potential flare-affected pixel, such as a maximum value pixel.

Second Identification Method

As indicated previously, the second identification method may involve the generation of a flare model, which may be an affine model for the four-dimensional (4D) coordinates of the flare-affected pixels of the light-field image 1000. The second identification method may also commence with detection of maximum value pixels, which may be brighter pixels 1060 as in FIG. 5B, as potential flare-affected pixels. This may be carried out as in the first identification method.

After the potential flare-affected pixels have been identified, instead of splitting the light field image 1000 into tiles 1200 as in the first identification method, a global parametric flare model may be generated. The global parametric flare model may be fitted to the lens flare based on the locations of the potential flare-affected pixels. Specifically, it may be assumed that the coordinates of flare-affected pixels follow a simple affine model:

u _(i) =c ₀×_(i) +c ₁ y _(i) +c ₂,  (3)

v _(i) =c _(a) x _(i) +c _(a) y _(i) +c ₅,  (4)

where (x_(i), y_(i), u_(i), v_(i)) is the 4D light field coordinate of pixel i, and {c₀, c₁, c₂, c₃, c₄, c₅} are the model parameters to be estimated. Because the potential flare-affected pixels may contain outliers from the true bright objects, a robust estimation procedure may be customized to estimate the parameters. In alternative embodiments, other algorithms may instead be used to ascertain the parameters of the model.

Once the global parametric flare model has been generated and fitted to the locations of the potential flare-affected pixels, the probability that each of the potential flare-affected pixels is a flare-affected pixel may be obtained, for example, as in (2) above. However, in the second identification method, the estimate of (u_(i),v_(i)) may come from (3) and (4) above, rather than from individual models for the tiles 1200.

First Correction Method

As indicated previously, the first correction method may involve local linear interpolation, which may be used to provide the flare-corrected pixel values based on neighboring pixel values of neighboring pixels proximate each flare-affected pixel of the light-field image 1000. A flare-corrected pixel value for a flare-affected pixel may be recovered from the interpolation of its neighboring pixels based on the local gradient information. While various interpolation algorithms may be used, the following may be advantageous:

$\begin{matrix} {{O_{i} = {{p_{i}*I_{i}} + {\left( {1 - p_{i}} \right)*p_{i}}}},} & (5) \\ {I_{i} = \left\{ {\begin{matrix} {I_{H},} & {{{{if}\mspace{14mu} {G_{V}}} - {G_{H}}} > T_{G}} \\ {I_{V},} & {{{{if}\mspace{14mu} {G_{H}}} - {G_{V}}} > T_{G}} \\ {\frac{I_{H} + I_{V}}{2},} & {otherwise} \end{matrix}.} \right.} & (6) \end{matrix}$

Here, I_(H) and I_(V) are the interpolation results along horizontal and vertical directions, respectively, and G_(H) and G_(V) are the gradients along the horizontal and vertical directions, respectively. The flare-affected pixels may be excluded for both the interpolation and gradient calculation. T_(G) is a constant threshold.

In some embodiments, the interpolation may be carried out in an edge-aware manner, i.e., in such a manner that the integrity of edges depicted in the light-field image 1000 will not be adversely affected by lens flare correction. Thus, if the flare-affected pixel is on or around an edge depicted in the light-field image 1000, the interpolation may be carried out exclusively along the edge instead of crossing the edge to avoid aliasing artifacts. Accordingly, for a lens-affected pixel on the edge, only neighboring pixels that are also on the edge may be used for the interpolation.

As mentioned previously, in the step 1150, the final pixel value for each flare-affected pixel may be computed by blending the corrected pixel value with the flare-affected pixel value for the flare-affected pixel. The corrected pixel value and the flare-affected pixel value may be blended in proportion to the probability computed in (2). Potential flare-affected pixels that do not follow the flare model may be assigned a low probability of being flare-affected pixels; accordingly, little or no correction may be applied to such potential flare pixels as the corrected light-field image is generated.

Second Correction Method

As indicated previously, the second correction method may utilize the probability computed in (2) above in conjunction with one or more further processing steps. Instead of using interpolation to correct flare-affected pixels, the second correction method may label flare-affected pixels so that they can be downweighted and/or excluded in the following processing. In some embodiments, a binary label may be applied by simply indicating which pixels have been identified as flare-affected pixels; these pixels may then be excluded from further processing. In other embodiments, a more flexible soft labeling method may be used.

Specifically, a weight may be assigned to each potential flare-affected pixel. In one example, the pixel weights may range from 0 to 1.0, with 1.0 being the weight for a pixel that is believed to have no probability of having been affected by lens flare. The weight may be inversely proportional to the probability that the potential flare-affected pixel is a flare-affected pixel. By way of example, the following formula may advantageously be used:

w _(i)=1−p _(i).  (7)

where p_(i) is given in (2) above.

This weight may be used in a wide variety of processes, many of which may tend to reduce the pixel value of low-weighted pixels, thereby naturally applying correction to flare-affected pixels. For example, in a projection process, each pixel may be modulated by its weight. Corrected pixel values may be provided in the course of such processing by virtue of the weight applied, based on the probability that each pixel is a flare-affected pixel.

Variations

As indicated previously, the method steps set forth above are merely exemplary. Many variations would be contemplated by a person of skill in the art with the aid of the present disclosure.

One such variation is the inclusion of user input in the method of FIG. 6. For example, the user may use the user input 815 of FIG. 3 and/or a corresponding component of the camera 800 to supply one or more parameters that guide performance of the step 1130, the step 1140, the step 1150, and/or the query 1160.

In some embodiments, the user may designate a subset of the light-field image 1000 that is to be processed for lens flare correction. Any known selection method, such as a window, lasso, or the like, may be used to designate the subset. This subset may be used in the performance of the step 1130, the step 1140, the step 1150, and/or the query 1160. Conversely, portions of the light-field image outside the subset may not be processed in these steps. Thus, computation time for the method may be reduced.

In other embodiments, the user may designate other parameters that set various thresholds or other settings utilized in the performance of the step 1130, the step 1140, the step 1150, and/or the query 1160. For example, the user may set the threshold used in identification of flare-affected pixels, the threshold used in edge interpolation, the shape of the probability function f, and/or the parameters in the robust flare model of the second identification method. The user may thus specify the amount of flare correction to be carried out.

In further embodiments, the user may determine when the method of FIG. 6 is complete. This may be done, for example, by answering the query 1160 of FIG. 6 affirmatively if lens flare correction is satisfactory, or negatively if further correction is needed.

Further, in some embodiments, the method of FIG. 6 may be used to correct the effects of multiple lens flares, which may originate from different light sources. In some embodiments, correction of a first lens flare may lead to the generation of an intermediate light-field image. With the effects of the first lens flare mitigated and/or removed, detection of flare-affected pixels affected by a second lens flare may be facilitated. Thus, performance of multiple iterations of the step 1130, the step 1140, the step 1150, and/or the query 1160 may help to correct for multiple lens flares.

Results

FIGS. 10A through 10F illustrate results that may be obtained by performing the method of FIG. 6 on the light-field image of FIG. 1A. Generally, flare-affected pixels may be identified by the performance of the first identification method or the second identification method, with the possibility of identifying some outliers as potential flare-affected pixels. The outliers may be removed in the probability calculation, and the flare-affected pixel values may be corrected pursuant to the first correction method or the second correction method.

Specifically, FIG. 10A is a light-field image 1500 before processing to correct lens flare. The light-field image 1500 may be a subset of the light-field image 1000 of FIG. 5A.

FIG. 10B is a map 1510 of the maximum value pixels of the light-field image 1500 of FIG. 10A. The map 1510 may be generated pursuant to the first identification method described above.

FIG. 10C is a map 1520 of the probability that each of the pixels of the light-field image 1500 of FIG. 10A is a flare-affected pixel. The map 1520 may be obtained through the first identification method described above.

FIG. 10D is a corrected light-field image 1530 obtained by processing the light-field image 1500 of FIG. 10A to correct for lens flare. The corrected light-field image 1530 may be obtained via application of the first correction method described above.

FIG. 10E is a map 1540 of the maximum value pixels of the light-field image of FIG. 10A. The map 1540 may be generated by applying the second identification method described above.

FIG. 10F is a map 1550 of the pixel weights of the light-field image of FIG. 10A. The map 1550 may be used to carry out the second correction method described above.

FIG. 11A is a light-field image 1600 before processing to correct for lens flare. Lens flare effects can be seen in the form of bright spots like the brighter pixels 1060 of FIG. 5B.

FIG. 11B is a corrected light-field image 1610 generated by application of the first identification method and the first correction method described above to the light-field image 1600 of FIG. 11A. The bright spots have been substantially eliminated.

FIG. 11C is a corrected light-field image 1620 generated by applying the second identification method and the second correction method described above to the light-field image 1600 of FIG. 11A. Again, the bright spots have been substantially eliminated.

The above description and referenced drawings set forth particular details with respect to possible embodiments. Those of skill in the art will appreciate that the techniques described herein may be practiced in other embodiments. First, the particular naming of the components, capitalization of terms, the attributes, data structures, or any other programming or structural aspect is not mandatory or significant, and the mechanisms that implement the techniques described herein may have different names, formats, or protocols. Further, the system may be implemented via a combination of hardware and software, as described, or entirely in hardware elements, or entirely in software elements. Also, the particular division of functionality between the various system components described herein is merely exemplary, and not mandatory; functions performed by a single system component may instead be performed by multiple components, and functions performed by multiple components may instead be performed by a single component.

Reference in the specification to “one embodiment” or to “an embodiment” means that a particular feature, structure, or characteristic described in connection with the embodiments is included in at least one embodiment. The appearances of the phrase “in one embodiment” in various places in the specification are not necessarily all referring to the same embodiment.

Some embodiments may include a system or a method for performing the above-described techniques, either singly or in any combination. Other embodiments may include a computer program product comprising a non-transitory computer-readable storage medium and computer program code, encoded on the medium, for causing a processor in a computing device or other electronic device to perform the above-described techniques.

Some portions of the above are presented in terms of algorithms and symbolic representations of operations on data bits within a memory of a computing device. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps (instructions) leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical, magnetic or optical signals capable of being stored, transferred, combined, compared and otherwise manipulated. It is convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like. Furthermore, it is also convenient at times, to refer to certain arrangements of steps requiring physical manipulations of physical quantities as modules or code devices, without loss of generality.

It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “processing” or “computing” or “calculating” or “displaying” or “determining” or the like, refer to the action and processes of a computer system, or similar electronic computing module and/or device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system memories or registers or other such information storage, transmission or display devices.

Certain aspects include process steps and instructions described herein in the form of an algorithm. It should be noted that the process steps and instructions of described herein can be embodied in software, firmware and/or hardware, and when embodied in software, can be downloaded to reside on and be operated from different platforms used by a variety of operating systems.

Some embodiments relate to an apparatus for performing the operations described herein. This apparatus may be specially constructed for the required purposes, or it may comprise a general-purpose computing device selectively activated or reconfigured by a computer program stored in the computing device. Such a computer program may be stored in a computer readable storage medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, flash memory, solid state drives, magnetic or optical cards, application specific integrated circuits (ASICs), and/or any type of media suitable for storing electronic instructions, and each coupled to a computer system bus. Further, the computing devices referred to herein may include a single processor or may be architectures employing multiple processor designs for increased computing capability.

The algorithms and displays presented herein are not inherently related to any particular computing device, virtualized system, or other apparatus. Various general-purpose systems may also be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the required method steps. The required structure for a variety of these systems will be apparent from the description provided herein. In addition, the techniques set forth herein are not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the techniques described herein, and any references above to specific languages are provided for illustrative purposes only.

Accordingly, in various embodiments, the techniques described herein can be implemented as software, hardware, and/or other elements for controlling a computer system, computing device, or other electronic device, or any combination or plurality thereof. Such an electronic device can include, for example, a processor, an input device (such as a keyboard, mouse, touchpad, trackpad, joystick, trackball, microphone, and/or any combination thereof), an output device (such as a screen, speaker, and/or the like), memory, long-term storage (such as magnetic storage, optical storage, and/or the like), and/or network connectivity, according to techniques that are well known in the art. Such an electronic device may be portable or nonportable. Examples of electronic devices that may be used for implementing the techniques described herein include: a mobile phone, personal digital assistant, smartphone, kiosk, server computer, enterprise computing device, desktop computer, laptop computer, tablet computer, consumer electronic device, television, set-top box, or the like. An electronic device for implementing the techniques described herein may use any operating system such as, for example: Linux; Microsoft Windows, available from Microsoft Corporation of Redmond, Wash.; Mac OS X, available from Apple Inc. of Cupertino, Calif.; iOS, available from Apple Inc. of Cupertino, Calif.; Android, available from Google, Inc. of Mountain View, Calif.; and/or any other operating system that is adapted for use on the device.

In various embodiments, the techniques described herein can be implemented in a distributed processing environment, networked computing environment, or web-based computing environment. Elements can be implemented on client computing devices, servers, routers, and/or other network or non-network components. In some embodiments, the techniques described herein are implemented using a client/server architecture, wherein some components are implemented on one or more client computing devices and other components are implemented on one or more servers. In one embodiment, in the course of implementing the techniques of the present disclosure, client(s) request content from server(s), and server(s) return content in response to the requests. A browser may be installed at the client computing device for enabling such requests and responses, and for providing a user interface by which the user can initiate and control such interactions and view the presented content.

Any or all of the network components for implementing the described technology may, in some embodiments, be communicatively coupled with one another using any suitable electronic network, whether wired or wireless or any combination thereof, and using any suitable protocols for enabling such communication. One example of such a network is the Internet, although the techniques described herein can be implemented using other networks as well.

While a limited number of embodiments has been described herein, those skilled in the art, having benefit of the above description, will appreciate that other embodiments may be devised which do not depart from the scope of the claims. In addition, it should be noted that the language used in the specification has been principally selected for readability and instructional purposes, and may not have been selected to delineate or circumscribe the inventive subject matter. Accordingly, the disclosure is intended to be illustrative, but not limiting. 

1. (canceled)
 2. (canceled)
 3. (canceled)
 4. (canceled)
 5. A method for correcting a light-field image to remove effects of a first lens flare, the method comprising: in a data store, receiving the light-field image after the light-field image has been captured by a light-field image capture device having a sensor and a plurality of microlenses; in a processor, identifying a plurality of flare-affected pixels of the light-field image that have been affected by the first lens flare, wherein the flare-affected pixels have flare-affected pixel values, wherein identifying the plurality of flare-affected pixels of the light-field image comprises: identifying a plurality of maximum value pixels, each of which has a pixel value higher than neighboring pixel values of neighboring pixels; generating a global parametric flare model of effects of the first lens flare based on locations of the maximum value pixels; and using the global parametric flare model to compute a probability that the pixel value of each of the maximum value pixel has been affected by the first lens flare; in the processor, generating flare-corrected pixel values for the flare-affected pixels, wherein, relative to the flare-affected pixel values, the flare-corrected pixel values at least partially remove effects of the first lens flare; and in the processor, using the flare-corrected pixel values to generate a corrected light-field image in which effects of the first lens flare are at least partially corrected.
 6. The method of claim 5, wherein generating the global parametric flare model of effects of the first lens flare based on locations of the maximum value pixels comprises generating a simple affine model that is predictive of the locations of the maximum value pixels.
 7. The method of claim 5, wherein generating flare-corrected pixel values for the flare-affected pixels comprises, for each of the flare-affected pixels, using neighboring pixel values to interpolate the flare-corrected pixel value for the flare-affected pixel.
 8. The method of claim 7, wherein generating flare-corrected pixel values for the flare-affected pixels further comprises: identifying at least one edge-located pixel of the flare-affected pixels, wherein each edge-located pixel is located proximate an edge depicted in the light-field image; and identifying a plurality of edge-located neighboring pixels that are located proximate the edge; wherein, for each of the edge-located pixels, using the neighboring pixel values to interpolate the flare-corrected pixel value comprises using exclusively the neighboring pixel values of the edge-located neighboring pixels to interpolate the flare-corrected pixel value.
 9. (canceled)
 10. The method of claim 5, wherein using the flare-corrected pixel values to generate a corrected light-field image comprises, for each of the flare-affected pixels, blending the flare-affected pixel value with the flare-corrected pixel value, with the flare-corrected pixel value weighted in proportion to the probability that the pixel value of the maximum value pixel has been affected by the first lens flare.
 11. The method of claim 5, wherein generating flare-corrected pixel values for the flare-affected pixels comprises, for each of the maximum value pixels, assigning a weight, inversely proportional to the probability that the pixel value of the maximum value pixel has been affected by the first lens flare; wherein generating the flare-corrected pixel values comprises processing the light-field image with at least one process in which each of the flare-affected pixels is excluded from processing in proportion to the weight assigned to it to obtain the flare-corrected pixel values.
 12. The method of claim 5, wherein using the flare-corrected pixel values to generate the corrected light-field image comprises: using the flare-corrected pixel values to generate an intermediate light-field image in which effects of the first lens flare are at least partially corrected; identifying a plurality of intermediate flare-affected pixels of the intermediate light-field image that have been affected by a selection from the group consisting of the first lens flare and a second lens flare, wherein the intermediate flare-affected pixels have intermediate flare-affected pixel values; generating intermediate flare-corrected pixel values for the intermediate flare-corrected pixels, wherein, relative to the intermediate flare-affected pixel values, the intermediate flare-corrected pixel values at least partially remove effects of the selection; and using the intermediate flare-corrected pixel values to generate the corrected light-field image.
 13. The method of claim 12, wherein the selection comprises the second lens flare.
 14. The method of claim 5, further comprising, in the processor, prior to identifying the plurality of flare-affected pixels, at an input device, receiving user input comprising a parameter; wherein at least one of identifying the plurality of flare-affected pixels, generating the flare-corrected pixel values for the flare-affected pixels, and using the flare-corrected pixel values to generate the corrected light-field image comprises using the parameter.
 15. The method of claim 14, wherein the parameter comprises a designation of a subset of the light-field image; wherein using the parameter comprises identifying the plurality of flare-affected pixels exclusively within the subset.
 16. (canceled)
 17. (canceled)
 18. (canceled)
 19. A non-transitory computer-readable medium for correcting a light-field image to remove effects of a first lens flare, comprising instructions stored thereon, that when executed by a processor, perform the steps of: causing a data store to receive the light-field image after the light-field image has been captured by a light-field image capture device having a sensor and a plurality of microlenses; identifying a plurality of flare-affected pixels of the light-field image that have been affected by the first lens flare, wherein the flare-affected pixels have flare-affected pixel values, wherein identifying the plurality of flare-affected pixels of the light-field image comprises: identifying a plurality of maximum value pixels, each of which has a pixel value higher than neighboring pixel values of neighboring pixels; generating a global parametric flare model of effects of the first lens flare based on locations of the maximum value pixels; and using the global parametric flare model to compute a probability that the pixel value of each of the maximum value pixel has been affected by the first lens flare; wherein generating the global parametric flare model of effects of the first lens flare based on locations of the maximum value pixels comprises generating a simple affine model that is predictive of the locations of the maximum value pixels; generating flare-corrected pixel values for the flare-affected pixels, wherein, relative to the flare-affected pixel values, the flare-corrected pixel values at least partially remove effects of the first lens flare; and using the flare-corrected pixel values to generate a corrected light-field image in which effects of the first lens flare are at least partially corrected.
 20. The non-transitory computer-readable medium of claim claim 19, wherein generating flare-corrected pixel values for the flare-affected pixels comprises, for each of the flare-affected pixels, using neighboring pixel values to interpolate the flare-corrected pixel value for the flare-affected pixel.
 21. The non-transitory computer-readable medium of claim 20, wherein generating flare-corrected pixel values for the flare-affected pixels further comprises: identifying at least one edge-located pixel of the flare-affected pixels, wherein each edge-located pixel is located proximate an edge depicted in the light-field image; and identifying a plurality of edge-located neighboring pixels that are located proximate the edge; wherein, for each of the edge-located pixels, using the neighboring pixel values to interpolate the flare-corrected pixel value comprises using exclusively the neighboring pixel values of the edge-located neighboring pixels to interpolate the flare-corrected pixel value.
 22. (canceled)
 23. The non-transitory computer-readable medium of claim 19, wherein generating flare-corrected pixel values for the flare-affected pixels comprises, for each of the maximum value pixels, assigning a weight, inversely proportional to the probability that the pixel value of the maximum value pixel has been affected by the first lens flare; wherein generating the flare-corrected pixel values comprises processing the light-field image with at least one process in which each of the flare-affected pixels is excluded from processing in proportion to the weight assigned to it to obtain the flare-corrected pixel values.
 24. The non-transitory computer-readable medium of claim 19, wherein using the flare-corrected pixel values to generate the corrected light-field image comprises: using the flare-corrected pixel values to generate an intermediate light-field image in which effects of the first lens flare are at least partially corrected; identifying a plurality of intermediate flare-affected pixels of the intermediate light-field image that have been affected by a second lens flare, wherein the intermediate flare-affected pixels have intermediate flare-affected pixel values; generating intermediate flare-corrected pixel values for the intermediate flare-corrected pixels, wherein, relative to the intermediate flare-affected pixel values, the intermediate flare-corrected pixel values at least partially remove effects of the second lens flare; and using the intermediate flare-corrected pixel values to generate the corrected light-field image.
 25. The non-transitory computer-readable medium of claim 19, further comprising instructions stored thereon, that when executed by a processor, perform the steps of, prior to identifying the plurality of flare-affected pixels causing an input device to receive user input comprising a parameter; wherein at least one of identifying the plurality of flare-affected pixels, generating the flare-corrected pixel values for the flare-affected pixels, and using the flare-corrected pixel values to generate the corrected light-field image comprises using the parameter.
 26. (canceled)
 27. (canceled)
 28. (canceled)
 29. A system for correcting a light-field image to remove effects of a first lens flare, the system comprising: a data store configured to receive the light-field image after the light-field image has been captured by a light-field image capture device having a sensor and a plurality of microlenses; and a processor, communicatively coupled to the data store, configured to: identify a plurality of flare-affected pixels of the light-field image that have been affected by the first lens flare, wherein the flare-affected pixels have flare-affected pixel values, wherein the processor is configured to identify the plurality of flare-affected pixels of the light-field image by: identifying a plurality of maximum value pixels, each of which has a pixel value higher than neighboring pixel values of neighboring pixels; generating a global parametric flare model of effects of the first lens flare based on locations of the maximum value pixels; using the global parametric flare model to compute a probability that the pixel value of each of the maximum value pixel has been affected by the first lens flare; and wherein the processor is further configured to generate the global parametric flare model of effects of the first lens flare based on locations of the maximum value pixels by generating a simple affine model that is predictive of the locations of the maximum value pixels; generate flare-corrected pixel values for the flare-affected pixels, wherein, relative to the flare-affected pixel values, the flare-corrected pixel values at least partially remove effects of the first lens flare; and use the flare-corrected pixel values to generate a corrected light-field image in which effects of the first lens flare are at least partially corrected.
 30. The system of claim 29, wherein the processor is further configured to generate the flare-corrected pixel values for the flare-affected pixels by, for each of the flare-affected pixels, using neighboring pixel values to interpolate the flare-corrected pixel value for the flare-affected pixel.
 31. The system of claim 30, wherein the processor is further configured to generate the flare-corrected pixel values for the flare-affected pixels by: identifying at least one edge-located pixel of the flare-affected pixels, wherein each edge-located pixel is located proximate an edge depicted in the light-field image; and identifying a plurality of edge-located neighboring pixels that are located proximate the edge; wherein, for each of the edge-located pixels, the processor is further configured to use using the neighboring pixel values to interpolate the flare-corrected pixel value by using exclusively the neighboring pixel values of the edge-located neighboring pixels to interpolate the flare-corrected pixel value.
 32. (canceled)
 33. The system of claim 29, wherein the processor is further configured to generate flare-corrected pixel values for the flare-affected pixels by, for each of the maximum value pixels, assigning a weight, inversely proportional to the probability that the pixel value of the maximum value pixel has been affected by the first lens flare; wherein the processor is further configured to generate the flare-corrected pixel values by processing the light-field image with at least one process in which each of the flare-affected pixels is excluded from processing in proportion to the weight assigned to it to obtain the flare-corrected pixel values.
 34. The system of claim 29, wherein the processor is further configured to use the flare-corrected pixel values to generate the corrected light-field image by: using the flare-corrected pixel values to generate an intermediate light-field image in which effects of the first lens flare are at least partially corrected; identifying a plurality of intermediate flare-affected pixels of the intermediate light-field image that have been affected by a second lens flare, wherein the intermediate flare-affected pixels have intermediate flare-affected pixel values; generating intermediate flare-corrected pixel values for the intermediate flare-corrected pixels, wherein, relative to the intermediate flare-affected pixel values, the intermediate flare-corrected pixel values at least partially remove effects of the second lens flare; and using the intermediate flare-corrected pixel values to generate the corrected light-field image.
 35. The system of claim 29, further comprising an input device configured to, prior to identification of the plurality of flare-affected pixels, receive user input comprising a parameter; wherein the processor is further configured to carry out at least one of identifying the plurality of flare-affected pixels, generating the flare-corrected pixel values for the flare-affected pixels, and using the flare-corrected pixel values to generate the corrected light-field image by using the parameter. 